package org.estela.comp;

import java.util.LinkedList;
import java.util.List;

public class EstelaProgram {

	private List<Statement> statements = new LinkedList<Statement>();
	
	public int size() {
		return statements.size();
	}
	
	public Statement getStatement(int idx) {
		return statements.get(idx);
	}
	
	public void addStatement(Statement stmt) {
		this.statements.add(stmt);
	}

	public List<Statement> getStatements() {
		return statements;
	}
 
	public void setStatements(List<Statement> statements) {
		this.statements = statements;
	}
	
	public String toString() {
		StringBuilder buff = new StringBuilder(getClass().getName()).append("@[");
		for(Statement stmt : this.statements) {
			buff.append("\n").append(stmt);
		}
		buff.append("\n]");
		return buff.toString();
	}

}
